#define _CRT_SECURE_NO_WARNINGS 1
#include "slit.h"

void test1()
{
	SLTNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushBack(&plist, 5);
	SListPushBack(&plist, 6);
	SListPushBack(&plist, 7);
	SListPrint(plist);

	SListPopFront(&plist);

	SListPrint(plist);
	SListPopBack(&plist);
	SListPrint(plist);

	SLTNode*pos = SListFind(plist, 4);
	if (pos)
	{
		SListInsert(&plist, pos, 30);
	}
	SListPrint(plist);
	pos = SListFind(plist, 2);
	if (pos)
	{
		SListInsert(&plist, pos, 10);
	}
	SListPrint(plist);
	pos = SListFind(plist, 3);
	Earse(&plist, pos);
	SListPrint(plist);


	pos = SListFind(plist, 10);
	Earse(&plist, pos);
	SListPrint(plist);
	Free(&plist);

}

int main()
{
	test1();
	return 0;
}